package day10;

import java.util.Objects;

public class Point {
    public static void main(String[] args){
        PointNum pointNum1=new PointNum(100,200,100);
        PointNum pointNum2=new PointNum(100,200,300);
        System.out.println(pointNum1.equals(pointNum2));

    }
}
class PointNum{
    int x;
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PointNum pointNum = (PointNum) o;
        return x == pointNum.x && y == pointNum.y && z == pointNum.z;
    }

    @Override
    public int hashCode() {
        return Objects.hash(x, y, z);
    }

    int y;
    int z;
    PointNum(int x,int y,int z){
        this.x=x;
        this.y=y;
        this.z=z;
    }
}